This application is related to the following co-pending and commonly-assigned patent applications:
Application Ser. No. 09/322,312, entitled xe2x80x9cUSING AN EPOCH NUMBER TO OPTIMIZE ACCESS WITH ROWID COLUMNS AND DIRECT ROW ACCESS,xe2x80x9d filed on same date herewith, by Robert W. Lyle et al., pending;
Application Ser. No. 09/321,675, entitled xe2x80x9cA FAST TECHNIQUE FOR RECOVERING AN INDEX ON AN AUXILIARY TABLE,xe2x80x9d filed on same date herewith, by Robert W. Lyle et al., pending;
Application Ser. No. 09/322,292, entitled xe2x80x9cSTORING AN UNCOMPRESSED DATA LENGTH IN A LOB MAP TO SPEED SUBSTRING ACCESS WITHIN A LOB VALUE,xe2x80x9d filed on same date herewith, by Robert W. Lyle et al., pending;
Application Ser. No. 09/322,287, entitled xe2x80x9cA TECHNIQUE TO AVOID PROCESSING WELL CLUSTERED LOB""S DURING REORGANIZATION OF A LOB TABLE SPACE,xe2x80x9d filed on same date herewith, by Charles R. Bonner et al., pending;
Application Ser. No. 09/322,317, entitled xe2x80x9cAN OPTIMIZED TECHNIQUE FOR PREFETCHING LOB TABLE SPACE PAGES,xe2x80x9d filed on same date herewith, by Charles R. Bonner et al., pending;
Application Ser. No. 09/322,698, entitled xe2x80x9cA TECHNIQUE FOR DETERMINING AN AGE OF AN OLDEST READING TRANSACTION WITHIN A DATABASE OBJECT,xe2x80x9d filed on same date herewith, by Robert W. Lyle et al., pending;
Application Ser. No. 09/372,315, entitled xe2x80x9cAN EFFICIENT TECHNIQUE TO DEFER LARGE OBJECT ACCESS WITH INTERMEDIATE RESULTS,xe2x80x9d filed on same date herewith, by Christine M. Lee et al., abandoned; and
Application Ser. No. 09/322,316, U.S. Pat. No. 6,144,970, entitled xe2x80x9cA TECHNIQUE FOR INPLACE REORGANIZATION OF A LOB TABLE SPACE,xe2x80x9d filed on same date herewith, by Charles R. Bonner et al.;
each of which is incorporated by reference herein.
1. Field of the Invention
This invention relates in general to computer-implemented database management systems, and, in particular, to generating unique quasi-random row identifiers that can be used as database partitioning keys.
2. Description of Related Art
A database is a collection of stored data that is organized as tables. A table consists of rows and columns of data. The rows are formally called tuples. A database will typically have many tables and each table will typically have multiple tuples and multiple columns. The tables are typically stored on direct access storage devices (DASD) such as magnetic or optical disk drives for semi-permanent storage.
In a distributed or parallel database, the data in a table can be contained in one or more database partitions. When a table is on multiple partitions, some of its tuples may be stored in one partition and some of its tuples may be stored in other partitions. Such a division of a table is called horizontal partitioning. Vertical partitioning occurs when columns are distributed among partitions. A key for identifying each local table is called a partitioning key. Computer users typically select the value of the partitioning key and perform the initial distribution of data amongst the partitions. Over time, the distribution of data may become unbalanced among the partitions. For example, some partitions may become too large, nearly exceeding their maximum size limit, and other partitions may contain small amounts of data and a great deal of unused space.
Therefore, there is a need for an improved database management system that can create partitioning keys and use those keys to evenly distribute data among partitions.
To overcome the limitations in the prior art described above, and to overcome other limitations that will become apparent upon reading and understanding the present specification, the present invention discloses a method, apparatus, and article of manufacture for generating a row identification number within a computer.
In accordance with the present invention, the row identification number is associated with a row in a database. The database is stored on a data storage device connected to a computer. A unique row identification number is created by using a computer-dependent timestamp. The unique row identification number is manipulated so that the row identification number is quasi-random.